package com.dick.base.parameter;

import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

@Data
public class ShelfModifyParameter {

    @NotNull(message = "请选择托盘，再修改")
    private Long id;
    /**
     * 托盘类型：木托、铁托
     */
    @NotEmpty(message = "请选择托盘类型")
//    @Pattern(regexp = "木托|铁托", message = "托盘类型只能为‘木托’、’铁托‘")
    private String shelfType;
    /**
     * 托盘自重，kg
     */
    @NotNull(message = "请输入托盘重量")
    @DecimalMin(value = "0", message = "托盘重量不能低于0kg")
    private BigDecimal shelfWeight;
    /**
     * 总重量，kg
     */
//    @NotNull(message = "请输入托盘毛量")
    @DecimalMin(value = "0", message = "托盘毛量不能低于0kg")
    private BigDecimal totalWeight;
}
